﻿<div class="ph-tabs">
    <ul>
        <li class="k-state-active">批量修改学生身份证</li>
    </ul>
    <div>
        <div class="GeneralEdit" id="fmStudentImport">
            <ul>
                <li>
                    <label>模板：</label>
                    <a href="/School/Student/ExportIDNO" target="_blank" class="k-button">点击下载学生模板</a>
                </li>
                <li>
                    <label>上传文件：</label>
                    <ul class="upfile k-block">
                        <li>
                            <input type="file" id="fileAux" name="fileAux" data-fid="" /></li>
                        <li>
                            <h4 id="fuAuxMsg"></h4>
                        </li>
                    </ul>
                </li>
                <li style="color:red">
                    <label>提示：</label>
                    <span>下载模板后，请不要修改前3列的数据，只需填写空的身份证号和修改错误的身份证号。修改完成后上传导入即可。</span>
                </li>
                <li id="lip">
                    <label>完成进度：</label>
                    <div id="progressbar"></div>
                </li>

                <li class="editButtons">
                    <button id="btnImport" class="k-button"><span class="k-icon k-i-tick"></span><span>开始导入</span></button>
                </li>
            </ul>
        </div>
    </div>
</div>

<script class="init">
    LocatedMenu("学校管理", "修改身份证");

    var pb = $("#progressbar").kendoProgressBar({
        type: "percent",
        min: 0,
        max: 100
    }).data("kendoProgressBar");
    $("#lip").hide();
</script>

<script class="import_student">
    $(function () {
        $("#btnImport").click(function (e) {
            var values = {
                fGuid: $("#fileAux").attr("data-fid"),
                sGuid: "@ViewBag.SchoolGuid",
            };

            Whale.Remote.Operation({
                url: "/School/Student/ChangeIDNO",
                parameters: values,
                success: function (result) {
                    FilterStudent();
                    $(".ph-tabs").data("kendoTabStrip").select(0);
                },
                error: function (msg) {
                    wndGeneralInformation.content(msg).open();
                    FilterStudent();
                }
            });

            $("#btnImport").hide();
            $("#lip").show();
            setTimeout(function () {
                GetFileProgress(values.fGuid, pb);
            }, 3000);
        });
    });
</script>
